﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Pot0a03
    {
        private int? _pclass;
		private string _pclassname;
		private string _muser;
		private string _listid;
		private string _status;
		
        /// <summary>
        /// 类型代码
        /// </summary>
		public int? Pclass
		{
			get { return _pclass;	 }
			set { _pclass=value;	}
		}
        /// <summary>
        /// 类型名称
        /// </summary>
		public string Pclassname
		{
			get { return _pclassname;	 }
			set { _pclassname=value;	}
		}
        /// <summary>
        /// 用户名
        /// </summary>
		public string Muser
		{
			get { return _muser;	 }
			set { _muser=value;	}
		}
        /// <summary>
        /// 主键标识
        /// </summary>
		public string Listid
		{
			get { return _listid;	 }
			set { _listid=value;	}
		}
        /// <summary>
        /// 
        /// </summary>
		public string Status
		{
			get { return _status;	 }
			set { _status=value;	}
		}
		
		public static List<Pot0a03> GetPot0a03ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Pot0a03> list = new List<Pot0a03>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Pot0a03 model = GetPot0a03ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Pot0a03 GetPot0a03ByDataRow(DataRow dr)
		{
			Pot0a03 model = new Pot0a03(); //实例化Pot0a03
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("pclass")&&!(dr["pclass"] is System.DBNull))  
				model.Pclass = ( int)dr["pclass"];
			if (dcc.Contains("pclassname")&&!(dr["pclassname"] is System.DBNull))  
				model.Pclassname = ( string)dr["pclassname"];
			if (dcc.Contains("muser")&&!(dr["muser"] is System.DBNull))  
				model.Muser = ( string)dr["muser"];
			if (dcc.Contains("listid")&&!(dr["listid"] is System.DBNull))  
				model.Listid = ( string)dr["listid"];
			if (dcc.Contains("status")&&!(dr["status"] is System.DBNull))  
				model.Status = ( string)dr["status"];
			
			return model;
		}
    }
}
